<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>模拟交通灯</title>
  <style>
    html, body {
      width: 100%;
      height: 100%;
      padding: 0;
      margin: 0;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }
    header {
      line-height: 2rem;
      font-size: 1.2rem;
      margin-bottom: 20px;
    }
    .traffic {
      padding: 10px;
      display: flex;
      flex-direction: column;
    }
    .traffic .light {
      width: 100px;
      height: 100px;
      background-color: #999;
      border-radius: 50%;
    }
    .traffic.pass .light:nth-child(1) {
      background-color: #0a6;
    }
    .traffic.wait .light:nth-child(2) {
      background-color: #cc0;
    }
    .traffic.stop .light:nth-child(3) {
      background-color: #c00;
    }
  </style>
</head>
<body>
  <header>模拟交通灯</header>
  <main>
    <div class="traffic pass">
      <div class="light"></div>
      <div class="light"></div>
      <div class="light"></div>
    </div>
  </main>
</body>
</html>